#define _CRT_SECURE_NO_WARNINGS 1
#include <stdio.h>
#include <math.h>

int* printNumbers(int n, int* returnSize)
{

    int  num = 0, j = 0;;
    num = *returnSize = pow(10, n) - 1;
    int* a = (int*)malloc(sizeof(int) * num);
    //*returnSize = num;

    while (num--)
    {
        a[j] = j + 1;
        j++;
    }

    return a;
    // write code here
}